<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
  var a = [1,2,3,4,5];
  // should output [2,4,6,8,10]
  for (var i=0;i<a.length;i++)
  {
    a[i]=a[i]*2;
  }
  document.write(a);
</script>
</body>
</html>